import java.io.*;

public class HelloWorld {
    public static void main(String[] args) throws IOException {
        FileReader fr=new FileReader("D:\\poem1.txt");
        FileWriter fw=new FileWriter("D:\\poem5.txt");
       int len;
       char[]b=new char[1024];
       while((len=fr.read(b))!=-1){
           fw.write(b,0,len);
       }
        fw.close();
        fr.close();
    }
}
